package org.jeecg.modules.mg;

import org.apache.commons.lang3.StringUtils;

public class DateUtil {

    public static String parseDateString(String date){
        if(StringUtils.isEmpty(date)){
            return StringUtils.EMPTY;
        }
        if(date.length()!=8){
            return date;
        }
        return date.substring(0,4)+"-"+date.substring(4,6)+"-"+date.substring(6);

    }

    public static void main(String[] args) {
        System.out.println(parseDateString("20200101"));
    }
}
